/**
 * 生成页面时页面的校验类型
 */
$.valid = {

	validType :[
	    {className:"email",validDesc:"邮箱格式校验"},
	    {className:"url",validDesc:"网址格式校验"},
	    {className:"date",validDesc:"日期格式校验"},
	    {className:"dateISO",validDesc:"DataISO格式校验"},
	    {className:"number",validDesc:"浮点数校验"},
	    {className:"digits",validDesc:"整数校验"},
	    {className:"creditcard",validDesc:"信用卡校验"},
	    {className:"maxlength",validDesc:"字符串最大长度校验"},
	    {className:"minlength",validDesc:"字符串最小长度校验"},
	    {className:"rangelength",validDesc:"输入长度区间校验"},
	    {className:"range",validDesc:"区间值校验"},
	    {className:"max",validDesc:"输入值最大值"},
	    {className:"min",validDesc:"输入值最小值"},
	    {className:"remote",validDesc:"Ajax校验"},
	    {className:"alphanumeric",validDesc:"仅能输入字母,数字,下划线"},
	    {className:"lettersonly",validDesc:"仅能输入字母"},
	    {className:"postcode",validDesc:"邮编校验"}
	],
	
	createOptions:function(){
		
		var str = new Array();
		
		var len = this.validType.length;
		
		var noneValid = "<option value=\"none\">无校验</option>";
		
		str.push(noneValid);
		
		for(var i=0;i<len;i++){
			
			var obj = this.validType[i];
			
			str.push("<option value=\""+obj.className+"\">"+obj.validDesc+"</option>");

		}
		
		return str.join("");
	}
};